﻿using ErrorOr;

namespace Gym.Domain.Common
{
    public class EventualConsistencyException : Exception
    {
        public Error EventualConsistencyError { get; }
        public List<Error> UnderlyingErrors { get; }

        public EventualConsistencyException(Error eventualConsistencyError, List<Error>? underlyingErrors)
        {
            EventualConsistencyError = eventualConsistencyError;
            UnderlyingErrors = underlyingErrors ?? new();
        }
    }
}
